$(function () {
    //删除提示
    $(".btn-delete").click(function () {
        let url = $(this).data("url")

        Swal.fire({
            title: 'Are you sure to delete?',
            //text: "You won't be able to revert this!",
            icon: 'warning',//图标
            showCancelButton: true,//是否显示取消按钮
            confirmButtonColor: '#3085d6',
            cancelButtonColor: '#d33',
            confirmButtonText: '确认',
            cancelButtonText: '取消'
        }).then((result) => {
            if (result.value) {
                //点击确认按钮后做的事情
                window.location.href = url
            }
        })
    })
})